<!DOCTYPE HTML>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
    
     <div class="container-div">
		<div class="row">
			<div class="col-sm-12 search-collapse">
				<form id="formId">
					<div class="select-list">
						<ul>
							<li>
								电梯名称：<input type="text" name="elevatorName"/>
							</li>

							<li>
								电梯品牌：<input type="text" name="elevatorBrand"/>
							</li>

							<li>
								电梯型号：<input type="text" name="elevatorModel"/>
							</li>

							<li>
								电梯厂商：<input type="text" name="elevatorBusiness"/>
							</li>

							<li>
								<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
								<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
							</li>
						</ul>
					</div>
				</form>
			</div>

			<div class="col-sm-12 select-table table-striped">
				<table id="bootstrap-table" data-mobile-responsive="true"></table>
			</div>
		</div>
	</div>
    <div th:include="include :: footer"></div>
    <script th:inline="javascript">
        var detailFlag = [[${@permission.hasPermi('business:elevatorInstall:detail')}]];
		var editFlag = [[${@permission.hasPermi('business:elevatorInstall:edit')}]];
        var removeFlag = [[${@permission.hasPermi('business:elevatorInstall:remove')}]];
        var prefix = ctx + "business/elevatorInstall";

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
				detailUrl: prefix + "/detail/{id}",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
				exportUrl: prefix + "/export",
                modalName: "电梯安装",
				search: false,
		        showExport: true,
                columns: [{
		            radio: true
		        },
				{
					field : 'installId', 
					title : '安装ID',
					visible: false
				},
				{
					title: "序号",
					formatter: function (value, row, index) {
						return $.table.serialNumber(index);
					}
				},
				{
					field : 'elevatorName', 
					title : '电梯名称'
				},
				{
					field : 'installPlace', 
					title : '安装位置',
					formatter: function(value, row, index) {
						return $.table.tooltip(value);
					}
				},
				{
					field : 'elevatorBrand', 
					title : '电梯品牌'
				},
				{
					field : 'elevatorModel', 
					title : '电梯型号'
				},
				{
					field : 'elevatorBusiness', 
					title : '电梯厂商'
				},
				{
					field : 'createBy', 
					title : '安装人'
				},
				{
					field : 'createTime', 
					title : '安装时间',
					sortable: true
				},
				{
					field : 'remark', 
					title : '备注',
					formatter: function(value, row, index) {
						return $.table.tooltip(value);
					}
				},
		        {
		            title: '操作',
		            align: 'center',
		            formatter: function(value, row, index) {
		            	var actions = [];
						actions.push('<a class="btn btn-warning btn-xs ' + detailFlag + '" href="#" onclick="$.operate.detail(\'' + row.installId + '\')"><i class="fa fa-search"></i>查看</a> ');
						actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.installId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
						actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.installId + '\')"><i class="fa fa-remove"></i>删除</a>');
						return actions.join('');
		            }
		        }]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>